home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / ftplugin / vim.vim < prev    next >
Encoding:
Text File  |  2001-09-17  |  980 b   |  37 lines

  1. " Vim filetype plugin
  2. " Language:    Vim
  3. " Maintainer:    Bram Moolenaar <Bram@vim.org>
  4. " Last Change:    2001 Sep 17
  5.  
  6. " Only do this when not done yet for this buffer
  7. if exists("b:did_ftplugin")
  8.   finish
  9. endif
  10.  
  11. " Don't load another plugin for this buffer
  12. let b:did_ftplugin = 1
  13.  
  14. " Set 'formatoptions' to break comment lines but not other lines,
  15. " and insert the comment leader when hitting <CR> or using "o".
  16. setlocal fo-=t fo+=croql
  17.  
  18. " Set 'comments' to format dashed lists in comments
  19. setlocal com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\"
  20.  
  21. " Format comments to be up to 78 characters long
  22. setlocal tw=78
  23.  
  24. set cpo-=C
  25.  
  26. " Let the matchit plugin know what items can be matched.
  27. if exists("loaded_matchit")
  28.   let b:match_ignorecase=0
  29.   let b:match_words=
  30.     \ '\<fun\%[ction]\>:\<retu\%[rn]\>:\<endf\%[unction]\>,' .
  31.     \ '\<while\>:\<break\>:\<con\%[tinue]\>:\<endw\%[hile]\>,' .
  32.     \ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' .
  33.     \ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,' .
  34.     \ '(:)'
  35. endif
  36.  
  37.